<template>
	<view class="emoji-a1" @tap.stop="cancle">
		<view class="emoji-a1-b1" @tap.stop="">
			<view class="emoji-a1-b1-c1">
				<view class="emoji-a1-b1-c1-d1" @tap.stop="cancle">
					<image class="emoji-a1-b1-c1-d1-f1" src="../../static/images/emoji/keyboard.png" mode=""></image>
				</view>
			</view>
			<EmojiOfficial v-if="index == 0" :add-emoji="addEmoji"/>
			<EmojiAnimal v-if="index == 1" :add-emoji="addEmoji"/>
			<StickerPupFoxDaily v-if="index == 2" :add-emoji="addEmoji"/>
			<view class="emoji-a1-b1-c2">
				<view @tap.stop="changeEmoji(0)" class="emoji-a1-b1-c2-d1" :class="[index == 0 ?'active':'']">😀</view>
				<view @tap.stop="changeEmoji(1)" class="emoji-a1-b1-c2-d1" :class="[index == 1 ?'active':'']">🐶</view>
				<view @tap.stop="changeEmoji(2)" class="emoji-a1-b1-c2-d1" :class="[index == 2 ?'active':'']">
					<image src="https://face.t.sinajs.cn/t4/appstyle/expression/ext/normal/f0/xhrnew_weixiao_org.png" class="emoji-a1-b1-c2-d1-f1" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import EmojiOfficial from '@/components/emoji/emoji-official'
	import EmojiAnimal from '@/components/emoji/emoji-animal'
	import StickerPupFoxDaily from '@/components/emoji/sticker-pup-fox-daily'
	export default {
		data() {
			return {
				index:0
			};
		},
		props:{
			addEmoji:Function
		},
		components:{
			EmojiOfficial,
			EmojiAnimal,
			StickerPupFoxDaily
		},
		methods:{
			cancle(){
				this.$emit('cancle')
			},
			changeEmoji(index){
				this.index = index
			}
		}
	}
</script>

<style>
	.emoji-a1-b1-c2-d1-f1{
		width: 56rpx;
		height: 56rpx;
	}
	.emoji-a1-b1-c2 .active{
		background-color: #f6f6f6;
	}
	.emoji-a1-b1-c1-d1-f1{
		width: 48rpx;
		height: 48rpx;
	}
	.emoji-a1-b1-c1-d1{
		width: 128rpx;
		height: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.emoji-a1-b1-c2-d1{
		padding: 4rpx;
		width: 104rpx;
		height: 64rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		
		font-size: 48rpx;
	}
	.emoji-a1-b1-c2{
		width: 100%;
		height: 72rpx;
		display: flex;
	}
	
	.emoji-a1-b1-c1{
		width: 100%;
		height: 96rpx;
	}
	.emoji-a1-b1{
		width: 750rpx;
		height: 476rpx;
		background-color: #fff;
		overflow: hidden;
	}
	.emoji-a1{
		position: fixed;
		bottom: 0;
		top: 0;
		left: 0;
		right: 0;
		z-index: 1000;
		display: flex;
		flex-direction: column;
		justify-content: flex-end;
	}
	page{
		overflow: hidden;
	}

</style>
